/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cn.ekuma.epos.swing.calc;

/**
 *
 * @author Administrator
 */
public abstract class AbstractOP implements CalcLogic{
       protected double num;
       protected boolean isDataOk;
       public AbstractOP(){
           num=0;
           isDataOk=false;
       }

        public AbstractOP(double num1){
            num=num1;
            isDataOk=true;
        }

        @Override
        public String toString(){
            return getOpStyle()+""+getNum();
        }

    /**
     * @return the opStyle
     */
    public abstract String getOpStyle();

    /**
     * @return the num
     */
    public double getNum() {
        return num;
    }

    /**
     * @param num the num to set
     */
    public void setNum(double num) {
        this.num = num;
        isDataOk=true;
    }

    /**
     * @return the isDataOk
     */
    public boolean isIsDataOk() {
        return isDataOk;
    }

    /**
     * @param isDataOk the isDataOk to set
     */
    public void setIsDataOk(boolean isDataOk) {
        this.isDataOk = isDataOk;
    }
    
     @Override
    public abstract CalcLogic clone();
}
